<!--<script src="<?php echo base_url_site();?>templates/js/realtime/socket.io.js"></script>
<script src="<?php echo base_url_site();?>templates/js/realtime/realtime.js"></script>-->
<?
	$attributes = array('class' => 'email', 'id' => 'checknew');
	echo form_open($this->_module_name.'/comment/trashes', $attributes);
?>
<input type="hidden" name="current_page" value="<?=(int)$current_page?>">
<table class="admindata">
    <thead>
        <tr>
            <th colspan="7"> 
                <? //if($this->acl->check('trash')){ ?>
                <input type="submit" onClick="return verify_del();" name="btn_submit" class="submit" value="<?=lang('delete');?>">
                <? //} ?>
                <?=lang('total');?> <?=$num?> <?=lang('record');?>
                <span class="pages"><?=$pagination?></span> 
        <span style="float:right;">
        	<select name="cm_kind" id="cm_kind" class="w150" onChange="window.open('<?=base_url()?>mod_news/comment/index/'+this.value, '_self')">
			<?
            $cm_kind = $this->config->item('cm_kind') ; 
            for($i=0;$i<count($cm_kind);$i++){
            ?>
                <option value="<?=$i?>"><?=$cm_kind[$i]?></option>
            <? } ?>
           </select>
          </span>
                </th>
        </tr>
<script language="javascript">
	selectoption('cm_kind','<?=$this->uri->segment(4)?>') ;
</script>
        <tr>
            <th class="checkbox"><input type="checkbox" name="sa" id="sa" onClick="check_chose('sa', 'ar_id[]', 'checknew');" /></th>
            <th style="'width:100px;">Email</th>
            <th><?=lang('content');?></th>
            <th>Kind</th>
            <th>Date Create</th>
            <th width='120'><?=lang('functions');?></th>
        </tr>
    </thead>
<?
	$k=1;
	$cm_kind = $this->config->item('cm_kind') ;
	foreach($list as $rs):
?>
    <tr class="row<?=$k?>">
        <td><input type="checkbox" name="ar_id[]" value="<?=$rs->comment_id?>"></td>
        <td><?=$rs->email?></td>
        <td><a  class="view" href="<?=base_url().'mod_news/comment/view/'.$rs->comment_id?>"><?=str_limit($rs->lb_comment,100)?></a></td>
        <td><?=$cm_kind["$rs->kind"]?></td>
        <td><?=date('d/m/Y H:i', strtotime($rs->dt_create))?></td>
        <td align="center">
            <? /*= ($this->acl->check('edit'))? icon_edit($this->_module_name.'/comment/edit/'.$rs->comment_id.'/'.(int)$current_page);*/?>
            <span id="publish<?=$rs->comment_id?>">
            <?= /*($this->acl->check('edit'))?*/ icon_active("'comment'","'comment_id'", $rs->comment_id, $rs->bl_active);?>
            </span>
           
           
            <?= /*($this->acl->check('trash'))? */icon_trash($this->_module_name.'/comment/trash/'.$rs->comment_id.'/'.(int)$current_page);?></td>
    </tr>
    <?
		$k=1-$k;
		endforeach;
	?>
    <tfoot>
    <td colspan="7">
            <? //if($this->acl->check('trash')){ ?>
            <input type="submit" class="submit" onClick="return verify_del();" name="btn_submit" value="<?=lang('delete');?>">
            <? //} ?>
            <?=lang('total');?>
            <?=$num?>
            <?=lang('record');?>
            <span class="pages">
            <?=$pagination?>
            </span></td>
            </tfoot>
</table>
<?=form_close()?>
<script language="javascript">
	$('.view').colorbox({width:'80%', height:'60%'}) ;
</script>